package com.longge;

import java.util.HashMap;

class ParkingSystem {
    private HashMap<Integer, Integer> map = new HashMap<>();

    public ParkingSystem(int big, int medium, int small) {
        map.put(1, big);
        map.put(2, medium);
        map.put(3, small);
    }

    public boolean addCar(int carType) {

        Integer count = map.get(carType);
        if (count > 0) {
            map.put(carType, --count);
            return true;
        }
        return false;
    }
}